<template>
  <ContentWrap>
    <el-descriptions :column="2">
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="订单编码" />
        </template>
        {{ data.no }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="订单类型" />
        </template>
        <dict-tag :type="DICT_TYPE.TRADE_ORDER_TYPE" :value="data.orderType || ''" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="昵称" />
        </template>
        {{ data.userName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="手机号" />
        </template>
        {{ data.mobile }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="开通次数" />
        </template>
        第{{ data.openNum }}次
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="开通等级" />
        </template>
        {{ data.openLevel }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="开通内容" />
        </template>
        {{ data.openContent }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="金额" />
        </template>
        {{ data.payPrice }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="下单时间" />
        </template>
        {{ formatDate(data.createTime) }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <descriptions-item-label label="订单状态" />
        </template>
        <dict-tag :type="DICT_TYPE.TRADE_ORDER_STATUS" :value="data.status" />
      </el-descriptions-item>
    </el-descriptions>
  </ContentWrap>
</template>
<script setup lang="ts">
import { formatDate } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'

const { data } = defineProps<{ data }>()
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
